body{
    font-size: 12px;
    min-width: 1226px; /* 最小宽度,再页面缩放时body的宽度会跟随缩放变化、最小不能低于指定值 */
}

.topbar-wrapper{ /*顶部导航条、外部容器*/
    width: 100%;
    height: 40px;
    line-height: 40px;
    background-color: #333;
}

/* 设置一个类,用来表示中间容器的宽度 */
.w{
    width: 1226px; /* 固定容器宽度 */
    margin: 0 auto; /*容器居中*/
}
.topbar a{
    color: #b0b0b0;
    display: block;
}
a{
    text-decoration: none;
}
.topbar a:hover{
    color: #fff;
}
.topbar .line{
    color: #6b6b6b;
    margin: 0 8px;
}

.service, .topbar li {
    float: left;
}

.shop-cart, .user-info{
    float: right;
}
.shop-cart a{
    background-color: #424242;
    text-align: center;
    width: 120px;
}
.shop-cart i{
    margin-right: 2px;
}
.shop-cart{
    margin-left: 26px;
}

.shop-cart:hover a{
    background-color: #fff;
    color: #ff6700;
}

.appDownload{
    position: relative;
}

/*为元素设置箭头、默认隐藏*/
.appDownload::after{
    display: none;
    content: '';
    position: absolute;
    width: 0px;height: 0px;
    border: 8px solid transparent;
    border-top: none;
    border-bottom-color: #fff;
    left: 0;
    bottom: 0;
    right: 0;
    margin: auto;
}

/*设置下载二维码样式、默认隐藏*/
.appDownload .qrcode{
    /* display: none; */
    position: absolute;
    left: -40px;
    width: 124px;
    /* height: 148px; */
    height: 0px; /* 为实现动画效果默认高度0来隐藏元素 */
    background-color: #fff;
    line-height: 1px;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, .3);
    color: #000;
    transition: height 0.3s;
    overflow: hidden;
    z-index: 20;
}
/*二维码图片样式*/
.appDownload .qrcode img{
    width: 90px;
    margin: 17px;
}

/*鼠标选中下载app、显示箭头与二维码*/
.appDownload:hover::after {display: block;}
.appDownload:hover .qrcode {display: block;height: 148px;}

.header-wrapper{
    position: relative;
}
.header{
    height: 100px;
}

.header .logo{
    float: left;
    margin-top: 22px;
    position: relative;
    width: 55px;
    height: 55px;
    overflow: hidden;
    text-indent: -9999px; /* 隐藏log中的文字：通过移动位置隐藏提供给爬虫识别的文字、只让爬虫看到小米官网、让他知道这个是官网图*/
}

.header .logo a{
    position: absolute;
    width: 55px;
    height: 55px;
    background-color: #ff6700;
    background-size: 100%;
    /* background-position: center; 应该是背景居中*/
    transition: left 0.3s;
}

.header .logo .home{
    background-image: url("/helloworld_html5/page/mi/imgs/home.png");
    left: -55px;
}
.header .logo .mi{
    background-image: url("/helloworld_html5/page/mi/imgs/logo-mi2.png");
    left: 0px;
}

/* 鼠标移入以后图标位置挪动 */
.header .logo:hover .mi{
    left: 55px;
}
.header .logo:hover .home{
    left: 0px;
}

.header .nav-wrapper{
    float: left;
    margin-left: 7px;
}

.nav-wrapper .nav{
    height: 100px;
    line-height: 100px;
    padding-left: 58px;
}

.nav > li{
    float: left;
}

.nav li a{
    display: block;
    font-size: 16px;
    margin-right: 20px;
}

ul.nav li a:hover{ /* 加上ul更加精确 */
    color: #ff6700;
}

.nav .add-goods{ /* 隐藏全部商品分类 */
    visibility: hidden;
}

.nav .goods-info{
    /* height: 228px; */
    height: 0;
    width: 100%;
    background-color: #fff;
    position: absolute;
    left: 0;
    top: 100px;
    transition: height 0.3s;
    overflow: hidden;
    z-index: 10;
}

/*.nav li:not(:first-of-type):not(:nth-child(9)):not(:last-of-type):hover ~ .goods-info /*忽略：第一个、第9个、最后一个,不推荐 */
.nav .show-goods:hover ~ .goods-info /* 推荐加个class属性来控制 */
,.goods-info:hover {
    border-top: 1px solid rgb(224, 224, 224);
    box-shadow: 0 5px 3px rgba(0, 0, 0, .1);
    height: 228px;
}

.all-goods-wrapper{
    position: relative;
}

.left-menu{ /* 左侧导航栏 */
    width: 234px;
    height: 420px;
    background-color: rgba(0, 0, 0, .6);
    position: absolute;
    z-index: 9;
    left: -120px;
    line-height: 1px;
    padding: 20px 0;
    
}

.left-menu li a{
    display: block;
    height: 42px;
    line-height: 42px;
    color: white;
    margin-right: 0;
    padding: 0 30px;
    font-size: 14px;
}

.left-menu i{
    line-height: 42px;
    float: right;
}

ul.left-menu li a:hover{
    color: white;
    background-color: #ff6700;
}

.search-wrapper{
    width: 296px;
    height: 50px;
    float: right;
    margin-top: 25px;
    background-color: red;
}

.search-wrapper .search-inp{
    box-sizing: border-box;
    width: 244px;
    height: 50px;
    border: none;
    padding: 0 10px;
    float: left;
    border: 1px solid rgb(224, 224, 224);
    border-right: none;
    outline: none;
}
.search-wrapper .search-inp:focus
,.search-wrapper .search-inp:focus + .search-bth{
   border-color: #ff6700;
}

.search-wrapper .search-bth{
    width: 52px;
    height: 50px;
    border: none;
    padding: 0;
    float: left;
    background-color: #fff;
    color: #616161;
    font-size: 16px;
    border: 1px solid rgb(224, 224, 224);
}
.search-wrapper .search-bth:hover{
    background-color: #ff6700;
    color: white;
    border: none;
    cursor: pointer;
}

.banner{
    position: relative;
    height: 460px;
    overflow: hidden;
}
.banner .img-list{
    position: relative;
    display:flex;
    left: 0px;
}

.banner .img-list img{
    height: 460px;
    vertical-align: top;
}

.pointer{
    position: absolute;
    bottom: 22px;
    right: 35px;
}

.pointer a{
    float: left;
    width: 6px;
    height: 6px;
    border: 2px rgba(255, 255, 255, .4) solid;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, .4);
    margin-left: 6px;
}

.pointer a:hover,.pointer .active{
    border: 2px rgba(0, 0, 0, .4) solid;
    background-color: rgba(255, 255, 255, .4);
}

.prev-next a{
    width: 41px;
    height: 69px;
    position: absolute;
    /* background-color: red; */
    top: 0;
    bottom: 0;
    margin: auto;
    cursor: pointer;
    background-image: url("../imgs/icon-slides.png");
}

.prev-next .swiper-button-prev{
    left: 234px;
    right: auto;
    background-position: -84px 0;
}

.prev-next .swiper-button-prev:hover{ /* 前箭头、移入按钮图位置移动 */
    background-position: 0 0;
}

.prev-next .swiper-button-next{
    right: 0;
    background-position: -125px 0;
}

.prev-next .swiper-button-next:hover{ /* 后箭头、移入按钮图位置移动 */
    background-position: -42px 0;
}

.back-top{
    width: 26px;
    height: 206px;
    background-color: #ff6700;
    position: fixed;
    bottom: 60px;
    right: 50%;
    margin-right: -639px; /* (1226/2)+26=639px, 通过容器宽度除2得出一半距离再加上本身26宽度=639px、right再50%居中,想等于先把宽度加大再居中 */  
}

.ad {
    height: 170px;
    margin-top: 14px;
}

.ad .shortcut
,.ad li
,.ad-img img{
    float: left;
}

.ad .shortcut{
    width: 231px;
    height: 168px;
    background-color: #5f5750;
    margin-right: 1px;
    padding-top: 3px;
    padding-left: 3px;
}

.ad .shortcut li{
    position: relative;
}

.ad .shortcut li::before{
    content: '';
    position: absolute;
    width: 64px;
    height: 1px;
    background-color: #665e57;
    left: 0;
    right: 0;
    top: 0;
    margin: 0 auto;
}
.ad .shortcut li::after{
    content: '';
    position: absolute;
    width: 1px;
    height: 70px;
    background-color: #665e57;
    left: 0;
    top: 0;
    bottom: 0;
    margin: auto 0;
}

.ad .shortcut a{
    display: block;
    color: #cfccca;
    height: 84px;
    width: 76px;
    text-align: center;
    font-size: 12px;
    overflow: hidden;
}

.ad .shortcut a:hover{
    color: #fff;
}

.ad .shortcut i{
    display: block;
    margin-top: 20px;
    margin-bottom: 6px;
    font-size: 20px;
}

.ad .ad-img li{
    width: 316px;
    margin-left: 14.3px;
}

.ad-img img{
    width: 100%;
    vertical-align: top;
}